#pragma once

#include <boost/pool/detail/singleton.hpp>
#include <boost/thread.hpp>
#include <boost/smart_ptr.hpp>

using namespace boost;
using boost::details::pool::singleton_default;


class ThreadPoolMgr
{

public:

	ThreadPoolMgr();

	~ThreadPoolMgr();

	thread_group& get_thread_pool();

	void add_thread(thread* pthread);

	void remove_thread(thread* pthread);

	void join_all();

	uint32_t size();
	
	
private:

	thread_group m_thread_group;
	
};

typedef singleton_default<ThreadPoolMgr> g_ThreadPool_Mgr;


